 

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/subwayst/swtkofficialproduction/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/subwayst/swtkofficialproduction',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/subwayst/swtkofficialproduction/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/subwayst/swtkofficialproduction/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/subwayst/swtkofficialproduction',
    method: 'put',
    data: obj
  })
}


export function saveBatch(body) {
  return request({
    url: '/subwayst/swtkofficialproduction/saveBatch',
    headers: {"Content-Type": "multipart/form-data"},
    method: 'post',
    data: body
  })
}

export function exportExcel(query) {
  return request({
    url: '/subwayst/swtkofficialproduction/export',
    method: 'get',
    params: query,
    responseType: 'arraybuffer'
  })
}

export function auditBatch(obj) {
  return request({
    url: '/subwayst/swtkofficialproduction/auditBatch',
    method: 'put',
    data: obj
  })
}

export function submitBatch(obj) {
  return request({
    url: '/subwayst/swtkofficialproduction/submitBatch',
    method: 'put',
    data: obj
  })
}


export function delBatch(ids) {
  return request({
    url: '/subwayst/swtkofficialproduction/delBatch' ,
    method: 'delete',
    data:ids
  })
}

//导出
export function dataExport(query) {
  return request({
    url: '/subwayst/swtkofficialproduction/export',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}